<html>
<head>
<script type="text/javascript">
var c=0;
var t;
var seconds;

function timedCount(seconds)
{
document.getElementById('txt').value=c;
c=c+1;
howmany=seconds;
if (c == howmany) {	
alert("Tea Time");
t=setTimeout("stopCount()",1);
document.getElementById('txt').value="";
c=0;
}
t=setTimeout("timedCount(howmany)",1000);
}

function stopCount()
{
clearTimeout(t);
}
</script>
</head>

<body>
<div style="text-align:center">
<form>
<input type="button" value="1 min" onClick="timedCount(61)">
<input type="button" value="2 min" onClick="timedCount(121)">
<input type="button" value="3 min" onClick="timedCount(181)"><br>
<input type="button" value="4 min" onClick="timedCount(241)">
<input type="button" value="5 min" onClick="timedCount(301)">
<input type="button" value="6 min" onClick="timedCount(361)">
<br><br>
<input type="text" id="txt" size=3>

</form>
</div>
</body>

</html>


